<HTML>
	<TITLE>Workflow.NET
		<%#actionname%>
		-<%#propertyname%></TITLE>
	<STYLE><%#stylesheet%> 
	</STYLE>
	<BODY marginheight="0" marginwidth="0" topmargin="0" leftmargin="0">
		<form name="wf_theform" method="post">
			<TABLE width="<%#width%>" height="<%#height%>" bgcolor="<%#bgcolor%>" cellspacing="0" cellpadding="0" border="0">
				<TR>
					<TD valign="top">
						<TABLE>
							<TR>
								<TD valign="top">
									<IFRAME name="frame_newinputs" src="<%#requeststring%>&amp;pagesection=inputframe&amp;_mode=#_mode#&amp;_pageinfo=#_pageinfo#&amp;_questioncount=#_questioncount#" STYLE="WIDTH:490px;HEIGHT:250px">
									</IFRAME>
								</TD>
							</TR>
						</TABLE>
					</TD>
				</TR>
				<TR>
					<TD height="1" bgcolor="black"><IMG src="?drawimage=spacer.gif" height="1" width="1"></TD>
				</TR>
				<TR>
					<TD height="1" bgcolor="white"><IMG src="?drawimage=spacer.gif" height="1" width="1"></TD>
				</TR>
				<TR>
					<TD align="center">
						<TABLE bgcolor="white">
							<TR>
								<TD colspan="2">
									<B>Legends</B>
								</TD>
							</TR>
							<TR>
								<TD>
									<font color="red"><B>!</B></font>
								</TD>
								<TD>
									This question will be the decision maker for this checklist
								</TD>
							</TR>
							<TR>
								<TD>
									<font color="red"><B>*</B></font>
								</TD>
								<TD>
									if mandatory field is checked,user will be prompted to enter value during 
									action .
								</TD>
							</TR>
							<!--###<TR>
								<TD valign="top">
									<font color="blue"><B>&lt;xml&gt;</B></font>
								</TD>
								<TD>
									User inputs on this question will be added to document information that flows 
									in the workflow.
								</TD>
							</TR>-->
						</TABLE>
					</TD>
				</TR>
				<TR>
					<TD height="1" bgcolor="black"><IMG src="?drawimage=spacer.gif" height="1" width="1"></TD>
				</TR>
				<TR>
					<TD height="1" bgcolor="white"><IMG src="?drawimage=spacer.gif" height="1" width="1"></TD>
				</TR>
				<TR>
					<TD align="right" height="30" width="100%">
						<input type="button" class="buttons" value="Back" name="btnback" id="btnback" onclick="window.history.back();">
						<input type="button" class="buttons" value="Next" name="btnnext" id="btnnext" onclick="nextstep('#_mode#', 'page2','')">&nbsp;&nbsp;
						<input type="button" class="buttons" value="Cancel" ID="btnCancel" onclick="window.close();"
							NAME="btnCancel">
					</TD>
				</TR>
			</TABLE>
			<input type="hidden" name="_hidtempstore" id="_hidtempstore"><input type="hidden" name="_mode" ID="_mode">
			<input type="hidden" name="_pageinfo" id="_pageinfo"> <input type="hidden" name="_wizardsessionid" id="_wizardsessionid">
			<input type="hidden" name="hidLegendType" value="<%#LegendType%>">
		</form>
		<SCRIPT>

	function nextstep(mode,pageinfo,tempstore)
	{
		var frameinputs = getframeinputs()
		if (frameinputs.length>0)
		{
			tempstore +=frameinputs;
			document.wf_theform._mode.value=mode;	
			document.wf_theform._pageinfo.value = pageinfo;
			document.wf_theform._hidtempstore.value=tempstore;	
			document.wf_theform.submit()
		}
	}	
	
	function getframeinputs()
	{
		var i=0;
		var returnvalue="";
		var obj = eval("frame_newinputs");
		var tempobj;
		var d = obj.document
		var questiontype="";
		var temp="";
		if (parseInt(d.wf_theform.questioncount.value)> 0 )
		{
			for ( i = 0 ;i<parseInt(d.wf_theform.questioncount.value);i++)
			{
				tempobj = eval("d.wf_theform.displaytext" + i)
				temp = tempobj.value
				if (temp.length > 0)
				{
					returnvalue += "#" + tempobj.value;
					tempobj = eval("d.wf_theform.questiontype" + i)
					returnvalue += ";" + tempobj[tempobj.selectedIndex].value;
					questiontype = tempobj[tempobj.selectedIndex].value;
					tempobj = eval("d.wf_theform.options" + i)
					if (questiontype=="dropdown" || questiontype=="checkbox" || questiontype=="radio")
					{
						if (isNaN(tempobj.value) || parseInt(tempobj.value)==0)
						{
							alert("Incorrect entry. No. of options should be a numeric value and greater than 0");
							return "";
						}
					}
					else
					{
						if (isNaN(tempobj.value) || parseInt(tempobj.value) != 1 )
						{
							alert("Incorrect entry. No. of options should be a numeric value and equal to 1 ");
							return "";
						}
					
					}
					returnvalue += ";" + tempobj.value;
					//###Commented and new line added coz XML property was removed 
					//tempobj = eval("d.wf_theform.includeinxml" + i)
					//returnvalue += ";" + tempobj.checked;
					returnvalue += ";false"
					
					tempobj = eval("d.wf_theform.questionname" + i)
					if (tempobj!=null)
						returnvalue += ";" + tempobj.value;
					tempobj = eval("d.wf_theform.mandatory" + i)
					returnvalue += ";" + tempobj.checked;					
				}
			}
			if (returnvalue.length==0)
			{
				alert("1 or more questions have an incorrect definition");
				return "";
			}
			tempobj = eval("d.wf_theform._decisionmaker")
			//alert(tempobj.value)
			if(isNaN(tempobj.value))
				returnvalue += "#";
			else
				returnvalue += "#" + tempobj.value;	
				
			tempobj = eval("d.wf_theform._wizardsessionid")
			document.wf_theform._wizardsessionid.value = tempobj.value;
		}
		return returnvalue;
	}
		</SCRIPT>
	</BODY>
</HTML>
